<form id="from" name="from" method="post">
	<table class="formTable" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<th width="150"><label for="name"><tt id="name_name">订单来源名称</tt></label>：</th>
			<td>
				<span id="name_value" style="width:150px;" tp="name:{type:'text',validator:['realname','exist:<?php echo site_url('order/from/exist').(isset($o)?'|'.$o['name']:'');?>']}"><?php if(isset($o)) echo $o['name'];?></span>
				<div id="name_tip">名称由字母、数字、汉字组成，不能包含特殊字符！</div>
			</td>
		</tr>
		<tr>
			<th width="150"><label for="url"><tt id="url_name">订单来源网址</tt></label>：</th>
			<td>
				<span id="url_value" style="width:150px;" tp="url:{type:'text',validator:['empty','url']}"><?php if(isset($o)) echo $o['url'];?></span>
				<div id="url_tip">eg:http://www.wocing.com</div>
			</td>
		</tr>
		<tr>
			<th width="150"><label for="remark"><tt id="remark_name">备注</tt></label>：</th>
			<td>
				<span id="remark_value" style="width:400px;height:80px;" tp="remark:{type:'textarea'}"><?php if(isset($o)) echo $o['remark'];?></span>
				<div id="remark_tip">请填写备注信息。</div>
			</td>
		</tr>
	</table>
	<input class="button" type="submit" value="保存" />
	<?php if(isset($o)) echo '<input name="id" value="'.$o['id'].'" type="hidden"/><input id="backList" class="button" type="button" value="取消" title="返回列表" />'?>
</form>
<script type="text/javascript">
	$(function(){
		<?php if(isset($action)){?>
			new plugor.form({formid:'from',method:'POST',action:'<?php echo site_url('order/from/'.$action);?>',submit:'ajax'})
		<?php }else{?>
			new plugor.form({formid:'from',method:'POST',action:'<?php echo site_url('order/from/add');?>',submit:'ajax'})
		<?php }?>
	});
</script>